<template>
  <div class="hello">
    {{ msg }}
  </div>
</template>
<script lang="ts">
import { io } from "socket.io-client"
import { Options, Vue } from "vue-class-component"
@Options({
  props: {
    msg: String,
  },
})
export default class HelloWorld extends Vue {
  // data() {
  //   return {
  //     client: null,
  //   };
  // }

  // mounted() {
  //   const socket = io("/socket.io");
  //   // //接收来自服务端的信息事件c_hi
  //   socket.on("c_hi", function (msg: any) {
  //     alert(msg);
  //   });
  // }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
